<template>
  <div class="search-list">
    <scroll class="search-scroll">
      <div class="title"
           v-if="this.key!=''">
        <span>{{key}}</span>,找到
        <!-- <span>{{this.musiclist.length}}</span>首单曲 -->
      </div>
      <div class="bar">
        <search-bar :list='menuList'
                    :content='key' />
      </div>
      <div class="search-content">
        <!-- 对应的页面 -->
        <keep-alive>
          <router-view></router-view>
        </keep-alive>
      </div>
    </scroll>
  </div>
</template>

<script>
import Scroll from 'components/common/scroll/Scroll.vue'
import SearchBar from './childComps/searchBar.vue'
export default {
  name: 'SearchList',
  components: { Scroll, SearchBar },
  data () {
    return {
      key: "",
      menuList: ["单曲", "歌手", "歌单", "专辑", "MV"],
    }
  },
  created () {
    // 获取活跃路由参数
    this.key = this.$route.params.key;
  }
}
</script>

<style scoped>
.search-list {
  width: 100%;
  height: 100%;
  padding: 10px 35px;
  box-sizing: border-box;
}
.search-scroll {
  height: 100%;
  overflow: hidden;
}
.title {
  font-size: 14px;
  padding: 20px 0;
  color: #000;
}
.title span {
  color: #00aa85;
  padding: 0px 10px;
  font-size: 18px;
}
.bar {
  width: 100%;
  height: 49px;
  line-height: 49px;
  display: flex;
  /* border-bottom: 1px solid #000; */
  margin-bottom: 15px;
}
.bar-item {
  padding: 0px 20px;
  color: #000;
}
.action {
  color: #000;
  border-bottom: 3px solid #00aa85;
}
</style>
